﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FormsPrint.aspx.cs" Inherits="ZX.WebApp.Crm.BasePages.FormsPrint" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>表单打印</title>
    <%-- <LINK href="CSS/hfmanger.css" type="text/css" rel="stylesheet">--%>
    <link href="../../App_Themes/CielThemes/WhiteChromeGridView.css" rel="stylesheet"
        type="text/css" />
    <link href="../../App_Themes/CielThemes/Common.css" rel="stylesheet" type="text/css" />
    <style media="print">
        .noprint
        {
            display: none;
        }
    </style>
    <script src="../../Scripts/jquery-1.6.min.js" type="text/javascript"></script>
</head>
<body onload="remove_loading();">
    <form id="form1" runat="server">
  
    <table style="width: 100%" border="1">
        <tr>
            <td>
                <iframe class="IfrEditUIWindow" id="IfrEditUIWindow" frameborder="0" src="" style="width: 100%;
                    height: 100%; margin: 0px; padding: 0px;"></iframe>
            </td>
        </tr>
        <tr>
            <td style="width: 100%; height: 16px">
                <asp:GridView ID="gvworkflowMessage" CssClass="GridViewStyle" runat="server" AutoGenerateColumns="False"
                    Width="100%">
                    <Columns>
                        <asp:BoundField DataField="WorkFlowNo" HeaderText="流程编号">
                            <ItemStyle Width="5%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="TaskInstanceCaption" HeaderText="任务名称">
                            <ItemStyle Width="10%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="FlowCaption" HeaderText="流程名称">
                            <ItemStyle Width="10%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="OperatedDes" HeaderText="处理者">
                            <ItemStyle Width="10%" />
                        </asp:BoundField>
                        <asp:BoundField DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" HtmlEncode="False" DataField="taskStartTime"
                            HeaderText="任务开始时间">
                            <ItemStyle Width="10%" />
                        </asp:BoundField>
                        <asp:BoundField DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" HtmlEncode="False" DataField="taskEndTime"
                            HeaderText="任务结束时间">
                            <ItemStyle Width="10%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Message" HeaderText="审批意见">
                            <ItemStyle Width="25%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="SuccessMsg" HeaderText="状态">
                            <ItemStyle Width="10%" />
                        </asp:BoundField>
                    </Columns>
                    <FooterStyle CssClass="FooterStyle" />
                    <RowStyle CssClass="RowStyle" />
                    <EmptyDataRowStyle CssClass="EmptyRowStyle" />
                    <PagerStyle CssClass="PagerStyle" />
                    <SelectedRowStyle CssClass="SelectedRowStyle" />
                    <HeaderStyle CssClass="HeaderStyle" />
                    <EditRowStyle CssClass="EditRowStyle" />
                    <AlternatingRowStyle CssClass="AltRowStyle" />
                </asp:GridView>
            </td>
        </tr>
    </table>


    </form>
</body>
    <script language="javascript" type="text/javascript">
        var _URL = '<% =URL %>',
           _FormType = '<%=FormType %>';

        (function () {

            if (_FormType == 'Html') {
                //                   var load = function () {
                //                       //弹出对话框
                //                       YAHOO.namespace("example.container");

                //                       var handleSuccess = function (o) {
                //                           var response = o.responseText;
                //                           response = response.split("<!")[0];
                //                           document.getElementById("resp").innerHTML = response;
                //                       }
                //                       };

                //                       load();

                document.getElementById("IfrEditUIWindow").src = _URL;

                $("#IfrEditUIWindow").load(function () {
                    $(this).height($(this).contents().height());
                });

            }
        })();

        function preview() {
            bdhtml = window.document.body.innerHTML;
            sprnstr = "<!--startprint-->";
            eprnstr = "<!--endprint-->";
            prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr) + 17);
            prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));
            //window.document.body.innerHTML = prnhtml;
            window.document.body.innerHTML = $("#content").html();
            window.print();
        }

    </script>
</html>
